#help-archived
1 messages · Page 94 of 1
its slower tho
hash cod đ
In this case, referential equality is probably fine
Itâs a bird of some sort idk lol
yes hashcod and equail
ew?
Theyâre not the prettiest
Heâs a dick head
quail is good to eat
cods arenât so hot either
0
however, need to catch like 5-6 of them to have anything decent in terms of amount of food
they are very tiny birds that do not really fly. They mostly run on the ground XD
oh thatâs so weird
pigeons yummy
they can fly short distances
otherwise they live on the ground lol
kind of cool sometimes to see quail especially around spring time to see all the baby quail follow the Mother quail
I AM DECEASED @subtle blade look at these things run
lmao
Quail is California's state bird, pretty much the only reason I know about them
other then having eaten quail before
we donât have them here in north korea
you are in north korea o.O
Quail is California's state bird, pretty much the only reason I know about them
Is it really? Oh I am so making fun of the gf lol
â
ur state bird has a penis on its headâ
lol
switch(args[0].toUpperCase()) {
case "on":
p.sendMessage(plugin.onOffArgs("OnOffArgs.On"));
break;
case "off":
p.sendMessage(plugin.onOffArgs("OnOffArgs.Off"));
break;
default:
p.sendMessage(plugin.helpString("HelpMessage"));
break;
}``` whats wrong with the switch statement it just uses the default even if ingame i type /example on Im thinking it might be something wrong with my config
toUpperCase()
"on" & "off"
It's best here to use an if/else anyways so you can at least compare with equalsIgnoreCase() and allow for "oN" or "OfF"
eh, guess it does that anyways. yea. nevermind. Just fix your casing lol
No
If I were to run for example, /command on
Your switch statement is going to uppercase it and turn that argument into "ON"
"ON" will never equal "on" nor "off"
i see
okay yea i was basically thinking toUpperCase was the same thing as equalsIgnoreCase() but im stupid because it literally means To Upper Case
I mean you literally just have to change toUpperCase() to toLowerCase() and it'll work ;P

ill do it toLowerCase()
wo DotRar very techy name
@subtle blade yay now i can see that im getting syntax errors mighty fine
Lol
And it has to do with my chat color
this is fun
what would be the propper syntax so i dont get null pointer errors :|
public String onOffArgs(String config_message) {
ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.On"));
ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.Off"));
return getConfig().getString("OnOffArgs");
}```
Is there an equivalent for inventory view setCursor That is not deprecated?
Config's getString() is nullable
No
It works fine but is inconsistent and practically non-functionality in creative mode
It works fine but is inconsistent and practically non-functionality in creative mode
Just tested in creative and it worked well
@subtle blade i have been meaning to ask this I have 0 idea how the parent child works in configs i have just started working with them
The result of getString() will be null if not present in the config, which will throw an exception in ChatColor.translateAlternateColorCodes(). However, your calls to these methods are useless anyways as you don't assign them to anything. It's an empty call
Strings are immutable. Any change you make to a String will return a new String
String coloured = ChatColor.translateAlternateColorCodes('&', getConfig().getString("OnOffArgs.On"));
Also, getString() will accept a second argument to act as the default. getConfig().getString("OnOffArgs.On", "This will be used if not in the configuration file")
Lastly, return getConfig().getString("OnOffArgs"); is wrong because OnOffArgs is not a string. It's a category. This will throw an error too
I don't know what you want to return
I want to return the strings that is called
oic whatever was passed
yea
I dont get why dont people use things like nightconfig for managing configuration files.
It has annotation api, supports more formats than yaml, and is far simpler to use
yaml isnt too complex this is my first ever project incorperating a yaml file and this is my first issue im having
public String onOffArgs(String path) {
return ChatColor.translateAlternateColorCodes('&', config.getString(path, "The default message so it's not null"));
}```
Yaml is bad for users
JSON isn't a configuration file format
Yes but far less user-friendly than YAML
Yes but far less user-friendly than YAML
Hocon? hell no
If you really want to, you can write your own FileConfiguration implementation for HOCON
It's extendable
YAML takes short time to learn almost like instantly and itâs very user friendly as Choco said.
YamlConfiguration is an extension of it for plugins to use by default
I mean yeah Ig but many people likes yaml because if itâs syntax.
tbh many people dont know anything else
Depends
switch(args[0].toLowerCase()) {
case "on":
p.sendMessage(plugin.onOffArgs("OnOffArgs.On"));
break;
case "off":
p.sendMessage(plugin.onOffArgs("OnOffArgs.Off"));
break;
default:
p.sendMessage(plugin.helpString("HelpMessage"));
break;
}``` basically I want this to when player sends message /example [on, off] to send on or off message
```java
public String onOffArgs(String path) {
return ChatColor.translateAlternateColorCodes('&', getConfig().getString(path, "The default message so it's not null"));
} ``` using the class you gave me what should I do
im adding more later im just testing with on off
if it was only on and off I would have used if statements
I have never worked with yaml parent child sections before
đ
Well I mean the YamlConfiguration#getString(path, def) is a way to get a fallback value if the present value of the path is null.
How can I make arrows go through certain players?
I don't mind using NMS
But would prefer a protocollib approach
I guess you kind of donât really know what you try to accomplish @hallow surge ?
Foo:
Bar:
Baz:
HelloWorld: "This is my value!"```
`String thisIsMyValue = getConfig().getString("Foo.Bar.Baz.HelloWorld");`
Dots act as category separators
laughs in hocon
that wouldnt help me
thanks choco
thats what i did initally
so the color sattement was wrong as itss returning null and a section which you said earlier
how did they crash it
client
idk
send an enormous amount of packets to the server and it dies
i can literally crash a server by running through another player
you need to kick for too many packets
ok how can i fix it ?
you need to kick for too many packets
plugin ?
you'd have to ask someone who knows I just know you should kick a player if they send too many packets
i thought it was a build in spigot feature but maybe not
ehy I know I've asked this already in other places, but does someone here know how to register multiple LiteralCommandNode with permission (Using Commodore)?
Basically trying to set a required permission tab completion for subcommands of the same command
Is there anyone here willing to help set-up the votingplugin to my server.
Anyone able to help me with placeholders
im trying to let my players see how many virtual keys they have but the placeholder is not working
https://gyazo.com/0e75cce003bc3156b9e2dba9a8faea92
For some reason this seems to be returning null.
for (String string : buckets.getConfig().getStringList("pseudo-buckets." + bucketType + ".lore")){
pseBucket.addLore(API.colorize(string)); // NPE HERE
}
It can do everything else like pseBucket.setDisplayName(API.colorize(buckets.getString("pseudo-buckets." + bucketType + ".display-name"))); but adding the lore doesn't seem to work.
what triggers null specifically?
I comment coded it
pseBucket.?
I can't see why it would be that
for (String bucketType : buckets.getConfig().getConfigurationSection("pseudo-buckets").getKeys(false)){
Buckets pseBucket = new Buckets();
pseBucket.setGuiItem(new ItemStack(Material.matchMaterial(buckets.getString("pseudo-buckets." + bucketType + ".gui-item"))));
pseBucket.setPrice(Integer.valueOf(buckets.getConfig().getInt("pseudo-buckets." + bucketType + ".price")));
pseBucket.setDisplayName(API.colorize(buckets.getString("pseudo-buckets." + bucketType + ".display-name")));
pseBucket.setStack(new ItemStack(Material.matchMaterial(buckets.getString("pseudo-buckets." + bucketType + ".item-material"))));
for (String string : buckets.getConfig().getStringList("pseudo-buckets." + bucketType + ".lore")){
pseBucket.setLore(API.colorize(string));
}
pseudoBuckets.add(pseBucket);
getLogger().log(Level.INFO, "Loaded pseudo Bucket: " + bucketType);
}
It specifically throws an NPE on pseBucket.setLore(API.colorize(string));
what's a buckets?
Object
is displayname null?
i think it is
show us your config
i would debug out string
I know, the actual method adds to the array list
That's not the issue though.
Debugging the string outputs &7( Left click to place gen bucket. )
Yo, can I ask a question about some Vault related thing that seems very odd to me? Or is it just Spigot API here?
sure Gadse
[19:08:36 WARN]: java.lang.NullPointerException
[19:08:36 WARN]: at me.straggly.genbuckettest.Buckets.setLore(Buckets.java:38)
[19:08:36 WARN]: at me.straggly.genbuckettest.GenBucketTest.loadBuckets(GenBucketTest.java:125)
[19:08:36 WARN]: at me.straggly.genbuckettest.GenBucketTest.onEnable(GenBucketTest.java:38)
[19:08:36 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
[19:08:36 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)
[19:08:36 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
[19:08:36 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)
[19:08:36 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)
[19:08:36 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414)
[19:08:36 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378)
[19:08:36 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333)
[19:08:36 WARN]: at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263)
[19:08:36 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525)
[19:08:36 WARN]: at java.lang.Thread.run(Unknown Source)
yeah it's the setLore function
setlore is null
what's line 38 in Buckets
Oh I'm stupid lmao, forgot to initialize the ArrayList
f
there you go
đ
I've done that so much đ€Š
just don't :d
in general should i/we initialize arrays in the constructor or instantiation or does it matter
So, I'm having this weird issue that vault is not withdrawing balance from players, sometimes.
I'm calling
economy.withdrawPlayer(player, Math.min(actualDeposit, economy.getBalance(player)));
Where actualDeposit is a primitive double. But! Logging the EconomyResponse while debugging, returns that "Loans are not allowed", but only like in 10% of cases, not always. I'm genuinely confused as to why that would happen x)
like is there a substantial diff between
private List<String> example = new ArrayList<String>();
and
private List<String> example;
public Example() {
this.example = new ArrayList<String>();
}
not really msws
if you have only 1 constructor
it basically gets instanced anyway
while you have 2 or more constructors you can choose
if you want to save a lil' ram or not
Both are equivalent to
private List<String> example;
{
this.example = new ArrayList<>();
}```
neat ty
anyone got a smart idea or..
There's a slight difference between the two actually
Load order
Fields are initialized first, constructors called after
@stray iron i'd probably look if vault supports loans natively but other than that no idea
private String example = null;
private String usingExample = example.concat(" World!");
public Example() {
this.example = "Hello";
}```
That's an exception for instance
@torn robin no, the loans is an essentials economy sub-call, i know i could just hand out the permission, but all i want to do is take all money the player has .. which that call should do and does in 90% of cases
no idea, i'd debug the balance and see if it's at all different for the 10%
Choco static block is initiated first right?
yeah
It is, yes
afaik, static block, static fields, init block, member fields, constructor
Though static blocks and fields are initialized when the class is loaded by the classloader, not an instance of it
All of the above are initialized in order of appearance in source (such that they are of the same type - respective of their category)
Oh totally forgot about the initialize block
Is there a way to get the title of the destination inventory's title in InventoryMoveItemEvent
?jd
Pretty sure #getInventory() would give you the destination inventory?
You can check the name of the other Inventory
How would I do that
for example: by getting the TopInventory
The InventoryMoveItemEvent even has a method called "getDestination" which returns the "destinationInventory"
But I need the title
Inventory#getTitle ?
S
Not a method
Which version are you using ?
1.15.2
get the InventoryView and then the Title
Under what? Destination?
I think the event provides the InventoryView ?
Uh Idk maybe you could use the DragEvent instead ?
Alright
Or I mean you could make your own MoveItem event based on other inventory events
Does anyone know how I can execute a plugin command in a vanilla function?
Vanilla function ?
yeah datapack in the world folder
No idea
When is SignChangeEvent fired?
Afaik players can't change sign text
Or is it fired after a sign block is placed?
Anybody have a server That I can join?
What kind lol
@pastel fox after the sign is placed
When the player is done writing the sign?
How can I put data from an Async function into a Sync function?
When I open an inventory for a player, it automatically picks up an item from the inventory for them, how can I prevent this?
ItemPickup event ?
Isn't that for when a player picks up an item from the ground?
Thought you meant that
That's good because I have no idea what you're talking about lol
Delay the inventory opening by a single tick
Oh, you're re-setting the items aren't you?
I fixed that in the next build
if (event.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase(API.colorize("&9&lHorizontal Buckets"))){
player.closeInventory();
horizontalGUI.openInventory(player);
}
I use that
You donât need to close current inv to open a new one?
Yeah I was just testing solutions there
Btw isnât there like you can grief inventories if the player is sleeping with any inventory open?
I'll look into that at another time lmao
iirc that I struggled with that but just put an isSleeping check else bamboozle them from the inventory
Just prevent the player from taking out the items at all
Now with this
if (event.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase(API.colorize("&9&lHorizontal Buckets"))){
Bukkit.getScheduler().runTaskLater(GenBucketTest.getInstance(), new Runnable() {
@Override
public void run() {
event.setCancelled(true);
horizontalGUI.openInventory(player);
}
}, 3L);
}
It just drops the Lava bucket from the main GUI
how can I check if the plugin is running on a server that is in a bungee network?
How can I put data from an Async function into a Sync function?
hello! searching for a good program tutorial for spigot, found a really cool programing tutorial for spigot and bukkit, but he uses bukkit and I couldnt solve a problem that I had. Any of you could recommend a tutorial for spigot? Dont know any of this stuff, so it should teach from the beginning. Thanks!
tag me on answer
ping me on answer*
tim03we make your own Future implementation and once you invoke a request method you block the thread and wait for callback or smtng similar
Maybe do a quick google search to find a more pedantic solution
@chilly eagle for coding spigot plugins?
yes
I mean Iâd recommend IntelliJ IDEA but Eclipse IDE works as well.
And ask a lot of questions for your own understands.
Donât copy paste
Hmm anyone know if force opening a inventory(p.openInventory on top of a opened inventory) still calls close event on the first one?
I have a skygrid server and it also has water source blocks floating in the air. These blocks are currently automatically updating at random. How do I disable random block updates?
any reason this code doesn't work, when I have almost identical methods in other classes that work? ``` public void preventShiftgui (InventoryMoveItemEvent event) {
if (!Arrays.equals(event.getSource().getContents(), advancedSettingsGUI((Player)event.getSource().getHolder()).getContents())) return;
event.setCancelled(true);
}
public Inventory advancedSettingsGUI(Player player) {
Inventory inv = Bukkit.createInventory(null, 36, "Basic Settings");
Worker work = new Worker();
inv.setItem(11, work.createGuiItem(Material.BLUE_ICE, "§fFreeze Day Night Cycle at current time", "§f(Default on)"));
inv.setItem(13, work.createGuiItem(Material.DEAD_BUSH, "§fToggle plant growth", "§f(Default on)"));
inv.setItem(15, work.createGuiItem(Material.PIG_SPAWN_EGG, "§fToggle Mob Spawning", "§f(Default on)"));
//random tick speed 3
inv.setItem(31, work.createGuiItem(Material.BARRIER, "§fGo Back"));
//Here opens the inventory
return inv;
}```
there are no console errors
tim03we make your own Future implementation and once you invoke a request method you block the thread and wait for callback or smtng similar
@naive goblet did u have an example?
if (API.colorize(event.getView().getTitle()).equalsIgnoreCase(API.colorize(GenBucketTest.config.getString("config.gui-title")))){}
Should that work for checking a GUI title for InventoryDragEvent
Oh, why?
what did they rename it to?
Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);
better
hey does anyone know how to make the players chat window type something they are not typing ?
Do you know how I would improve this code to reduce lag/cpu usage
https://paste.md-5.net/izalaqodag.cs
@strange grove player.chat
issa method of Player
Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class); how do i fix that 'a' doesnt exist?
i'mn on 1.8
ouch ohsry
just dont use 1.8 ezpz
im saying like if I type a command and then i want it to get my commands contents and put it into that command
there is absolutely nothing wrong with 1.8
don't use replaceall đ€
h311 player.chat but with "/" then?
then call in another command then place the contents of the command i asked for and put it in there
@idle zodiac so are you challanging me?
so it's a combined effort
which a
public String onOffArgs(String path) {
getConfig().getConfigurationSection("OnOffArgs").getKeys(false);
return ChatColor.translateAlternateColorCodes('&', path);
}``` what should return should I use so my child statements print like so
```yaml
OnOffArgs:
On: On!
Off: Off!
Would print in game like On and Off
Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);
that one
and it does?
show more then
of what you got
uh can I have some help?
?paste
custom entity registry?
đŠ
you don't need to modify custom entity registry in 1.13+
H311 dont post to ask to help post your question
if not 1.12+
DONT ANSWER IT
okay then
than post a message link to before
ok
h3 did you not try player.chat("/" + args)
go be annoying somewhere else
how so?
if you cant help dont just cyberbully me about what fucking version i'm using
i'm not in the mood ok
oof
Occy calm down
@torn robin wdym by that?
well im using the plugin animated frames
and imtrying to make a replace command
so you can replace images
but i do not know and it's a bit to complicated
you better say thank you after you scream at me
thank you
so i got the idea
so what is it renamed to?
to combine commands
i'm looking for a
quick question guys, since I'm not sure about that one. Best method to create a 3x3 inventory?
i think that's whats happened here
so i'm trying to do this Asynchrounsly @torn robin
so it runs the remove command first taking the contents of the command I asked for
it removes the image
can you send your current code
hastebin dont work
pastebin
ye
md5 bin
i was about to try it
pm
then it executes the afcreate command
taking the contents from the replace command yet again
and using the name and url to create a totally new image
and it's literally the same thing so
without the players knowledge
if you're coding it it should be simple as player.chat
also pro gamers like myself use dm
hmm
as a british citizen
1.8.8?
help me pls
so
@frigid ember patience my friend
your sure @torn robin ?
ok
yes
it's just as simple as player.chat?
you can make the player chat with that yes
cannot resolve registerentity
so i can put text into their chat
yes
with them dispensing the command not me?
correct
@tiny dagger my brain hurts and i need to go soon lol
đ
thx for the help @torn robin
sending friend request đ
thank you for accepting đ
someone can help me??? '-'
@frigid ember be patient my dude
try asking your problem instead of putting in a txt
some of us have to wait multiple days for help ok
u sure ?
rather than just going
"ooh give help not gonna ask what tho"
just fucking as
your
question
no need to be salty
i'm not
you were given help
Whats happening lmao
why @idle zodiac ? đŠ
@paper compass now let me introduce you to a little fun thing called clinical depression
oh
play doom
nah
it's good for chill
i'm literally -1 years old
i cant play the nasty heathen nasty evil games yet
no no
else i will be smited by the lord above
plugin = premium bedwars, when I enter the game already configured, I am not teleported to the base and the villagers do not appear
rip
ah
ur punishing satanists
much better
Do you know how I would improve this code to reduce lag/cpu usage
https://paste.md-5.net/izalaqodag.cs
so be happy
i prefer bedwars
when you have time mention me: D
so i can kill children
well
u can kill fodder demons
its much more fun
and u can kill player demons
like playing battlemode
where it is slayer versus demon
ye i'll stick to just playing skywars insane mode with my armorsmith kit
and theirs no cussing
"saying heck in roblox not clickbait"
What happens if i cancel the swim event. What is the unintended behaviour
I can cancel the event correct?
the unintended behaviour is that the swim event cancels
sorry
XDD
that was an attempt at comedy
i'm going to overdose now
cya soon nerds
no
bye đ
do not
At least they tried to be funny?
How can I add an Entity to a Team?
Can i have an actual answer?
I'm seeing posts of people having issues adding the entity's uuid
If anyone has any experience with the event
Do you know how I would improve this code to reduce lag/cpu usage
https://paste.md-5.net/izalaqodag.cs
oh god the nesting
there is a lot of work
mhmm
đ
you know you can just
wait seriously
name = primary + "§1" + en.getKey().getName();
do you not know about return;
I know
How do you stop inventory dragging in 1.15.2?
use 1.8
lmfao
I don't lmao, it's for a client
I was originally in 1.8 but I had to convert to 1.15.2
L
Check the events
String name = "";
if (en.getKey().getName().equalsIgnoreCase("DIG_SPEED")) {
name = primary + "§lEfficiency";
continue;
} else if (en.getKey().getName().equalsIgnoreCase("LOOT_BONUS_BLOCKS")) {
name = primary + "§lFortune";
continue;
}
name = primary + "§l" + en.getKey().getName();
minedLore.add("§7" + name + " " + en.getValue());
}```
I used InventoryAction.MOVE_TO_OTHER_INVENTORY in the ClickEvent which seems to prevent shift clicking - that's it.
You can still drag and drop it
Or you can just use a map with a for loop
a map with a for loop lol what
String name = "";
if (en.getKey().getName().equalsIgnoreCase("DIG_SPEED")) {
name = primary + "§lEfficiency";
minedLore.add("§7" + name + " " + en.getValue());
continue;
} else if (en.getKey().getName().equalsIgnoreCase("LOOT_BONUS_BLOCKS")) {
name = primary + "§lFortune";
minedLore.add("§7" + name + " " + en.getValue());
continue;
}
name = primary + "§l" + en.getKey().getName();
minedLore.add("§7" + name + " " + en.getValue());
}```
How to fix? Server: 1.8.8 Client: 1.15.2
viaversion settings
viaversion ??
in sqlite if I get a ResultSet and then close it, is it fine if I subsequently try to get a string from it?
I tried and it's erroring in some use cases but not others seemingly
viaversion ??
@pure canopy ooo Thanks đ
Hey some one nous what is the Scheduled blocks?
and how i can fix the ticks
becost i looking reports in server and i see the name Scheduled blocks taks 96.98% of ticks
in sqlite if I get a ResultSet and then close it, is it fine if I subsequently try to get a string from it?
@slim hemlock If you close a result set, you can't fetch anything from it any longer
It will close your statement as well
essentials commands work and output as expected, but the minecraft chatbar says they don't exist. just started happening after i configured groupmanager. any ideas?
new to this whole server-running thing lol
what version of essentials are you running
actually now that i look at it, it's not even an issue with every command
lemme check
2.17.1.0
like mc version
1.15.2
server version is 1.15.2 im asuming
yes
hm not sure i dont use essentials because its a bad plugin to use especially if you can just make your own
ah
i just use it for user-friendliness, my server's only for like 10 people tops :p
@subtle blade yeah but assuming I did the fetching previously
I think I fucked up something about reloading this garbage
Oh yea, fetch previously then you're fine
get(), assign to variable, close result set
I mean it works but sometimes it gets weird on reloads
i need help with Strikepractice dm me for help please
@lusty quiver if its only like 10 of your friends dont worry about it too much
MobCoinGainEvent mobCoinGainEvent = new MobCoinGainEvent(attacker, 1);
Bukkit.getPluginManager().callEvent(mobCoinGainEvent);
if (!mobCoinGainEvent.isCancelled()) { // throwing NPE ???
Caused by: java.lang.NullPointerException
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:493) ~[server.jar:git-TacoSpigot-fd3209f3]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) ~[server.jar:git-TacoSpigot-fd3209f3]
at net.alfiesmith.mobcoins.listener.EntityDeathListener.onEntityDeath(EntityDeathListener.java:35) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[server.jar:git-TacoSpigot-fd3209f3]
private boolean isCancelled;
public MobCoinGainEvent(Player player, int amount) {
this.player = player;
this.amount = amount;
this.isCancelled = false;
}
Any reason why that line is throwing an NPE
well, the "unknown command" stuff just annoys me is all, and not being table to tab to auto-finish commands @hallow surge
i'd go without permissions at all but, i don't feel like opping everyone just for worldedit
understandable
its likely an error in the plugins code
that just never added tab complete to it
for 1.15.2 atlesat
yeah, it's just weird to me that it worked fine until i added groupmanager
ahhh
đ
nothing with essentials
possability your group doesnt have the permission to view the tab completion for that command or use it at all
@lusty quiver personally i reccomend pex or luck perms but ig its preference
as group manager is no longer supported it seemes like
Unfortunately I don't have as much time lately as I used to, so I cannot do what I wanted, and add new features to GroupManager. I am compiling for every new major Minecraft version and sometimes fixing bugs or updating deprecated code, but don't expect too much support. Development is taking place on GitHub, so feel free to contribute to the code base yourself, if you find something very important. I am really sorry if I respond late to your bug reports or messages.
which do you think would be better? it's my first time using a permissions plugin at all so i'm really just experimenting
Caused by: java.lang.NullPointerException
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:493) ~[server.jar:git-TacoSpigot-fd3209f3]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) ~[server.jar:git-TacoSpigot-fd3209f3]
at net.alfiesmith.mobcoins.listener.EntityDeathListener.onEntityDeath(EntityDeathListener.java:36) ~[?:?]
at sun.reflect.GeneratedMethodAccessor171.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) ~[server.jar:git-TacoSpigot-fd3209f3]
... 24 more
MobCoinGainEvent mobCoinGainEvent = new MobCoinGainEvent(attacker, 1);
Bukkit.broadcastMessage("pm null: " + (Bukkit.getPluginManager() == null));
Bukkit.broadcastMessage("is null: " + (mobCoinGainEvent == null));
Bukkit.getPluginManager().callEvent(mobCoinGainEvent);
Bukkit.broadcastMessage("event called");
if (!mobCoinGainEvent.isCancelled()) {
mobCoinsManager.incrementBalance(mobCoinGainEvent.getPlayer(), mobCoinGainEvent.getAmount());
messages.sendMessage(attacker, "mobcoins-gained", Messages.getPlaceholders("%amount%", String.valueOf(mobCoinGainEvent.getAmount())));
}
pm null is false, mobcoin is null is false...
then call event throws a NPE
am i missing something or
Bukkit.getPluginManager() == null?
wait, i think i've found the issue
and yea, i checked if the PM was null (just to confirm, doubted it would be) since calling the event threw an NPE
so i assumed either mobcoin event is null or the pm is null, and the event can't be null as i just instantiated it
@lusty quiver pex for sure than luck perms can get pretty complex
cool, i'll try it out, thanks
solved my own issue now anyway :p
@hallow surge could you direct me to the official link for PEX? i can't seem to find it
Could anyone help me with bungecord
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
@lusty quiver pex is outdated to xD
here is a link for luck perms
https://www.spigotmc.org/resources/luckperms.28140/
oh lol, well thanks!
make sure to download vault!
uhh, alright
Do I seriously have to pay $10 to change my spigot name :/
does it run on 1.15.2?
Im pretty sure
it does
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
i much prefer "definitely does" to "pretty sure it does"
It does
K?
and
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
đ wont learn if they dont do it themselves
i think it will work
How can I do this so that the Asynchronous Task inserts the variable that is not asynchronous into the "public string message"?
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
this.message = CompletableFuture.runAsync(() -> {
return "Hello";
}).join();```
join() will return the value in the completable future after it's completed and assign it
afaik it's non-blocking
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
which do you think would be better? it's my first time using a permissions plugin at all so i'm really just experimenting
@lusty quiver yoyoyoyyo
Don't use pex
For God's sake
Does anyone know what strikepractice is? dm me pls if you do i need some hellp with it oim new to server
s
Shut up
HAHAH
Hello,
I'm running a Bungeecord network with 1.15.2 spigot servers. I'm using a bungee plugin which adds a msg command. "whisper" is an alias for the msg command.
I'm having problems with tab completions. When I type in /msg, I see more than the playernames. I can see placeholder names from bungeetablistplus. When I use
the whisper command, I see player names only.
I guess the minecraft msg command adds those completions. Is it possible to turn that of for the specific command?
Tiippex
yeahh, i didn't wanna say anything but there was no way in hell i was gonna download a raw jar file lmaooo
@subtle blade what to do?
@lusty quiver luck perms
yeah i'll try it out later
Sorry. It should be supplyAsync(), not run
official page and set up video @lusty quiver
ty
Sorry. It should be supplyAsync(), not run
@subtle blade Thank you. It's working. If there are still errors because of this, I'll get back to you. â€ïž
@subtle blade I just heard that .join blocks the main thread until the task is completed. Is there another method without blocking the thread?
Docs say otherwise though 
Returns the result value when complete implies that it's a step
Ah I suppose not
See that's a weird one then because you're really not supposed to be able to assign values from a runnable
Actually I shouldn't worry about it, because actually only strings are set and nothing bigger?
Hi, is there anyway to make the zombie pig spawn agressive?, or any method to change their status?
I would like to get a player using a string name though when I checked out the method if(plugin.getServer().getPlayer("")) it seemed to be deprecated, is there a separate method I should use?
Ok thanks
Also apparently setting a player banned is deprecated? I'm not sure though that seems pretty broad and weird that it's deprecated, does anyone know why?
I now see there's a BanList class though not completely sure how to use it ^, I tried assigning a variable to a new instance of it and called it directly though still couldn't exactly find the methods
@subtle blade join will block
Inconsistent 
I now see there's a
BanListclass though not completely sure how to use it ^, I tried assigning a variable to a new instance of it and called it directly though still couldn't exactly find the methods
@wheat summit Bukkit.getBanList()
Oh thatâs an old message lol sorry, but yea
Hey, I was playin around with the spigot-server and spigot-api and wanted to remove the loading-world screen for players, since a plugin for that already exists. But I wanted to ask how I can do that in the server code?
Please @ me when you answer :D
Very unspecific wym by removing the loading-world screen. In what context?
When the player is changing the world
There is a plugin that does that, but it only works with ProtocolLib, so I can't really do what he does in the actual server since PLib is a plugin
Didn't know it was possible
It is
hmm that's intressting
The problem is that it uses ProtocolLib
why is that a problem?
He wants to patch the server and make a custom build
^
Question for any server owners out there. My admins and I are trying to figure out if we should remove towny and go with a different claim system. After some research, it seems that even with servers that are advertising, they don't have towny.
towny.... is tough. it's hard to retain new players because of the process of joining a town. it's not simple at all, but when a town is set up and all, it's great. But then again these great towns could've been done with any other plugin.
Towny just makes it hard to retain new players, it's just so complicated.
thoughts?
Just use nations or factions
Sorry for the ping @subtle blade though what would go as a parameter in the Type field?
The Bukkit.getBanList()
BanList.Type I think is the enum or something
It's fine
Ok
idk. I don't remember. It's probably still names
i.e. the person that banned them
Ok thanks
do PotionEffect's amplifiers start from 0 or 1?
0 iirc
thx
?jd
How does bukkit create the plugin dependency graph?
I am trying to build my own plugin system (independent of minecraft) and was using bukkit as an example, but I cant figure out load order.
Why almost all chat plugins work until 1.14.4
1.15.2 doesnt support that or what?
I've been trying to add a Simple plugin that works as a AntiSwearing but no one works.
Hi guys, I have Quickboard installed and whenever I modify the scoreboard to be how I want it to be, it just doesn't show up, until I put it back into the original installation state. Anything I can do, thanks!
is it possible to stop the night skip when sleeping
I want to make it so players have to sleep through the night
TimeSkipEvent.setCancelled
Anyone willing to help me with setting up voting on my server, message me!
Do you guys have a favorite gui/inventory library?
@frigid ember Did you set the proper permissions for your scoreboard?
Hey Guys ! I know spigot don't really support NMS modifications, but does someone have enought experience with containers to tell me how to add custom slots to the player inventory, I modified everything I could find about PlayerInventory in the Spigot/Spigot-API but I still can't save/use my slots. Thx for your help đ !
you'll never be able to see the new slots though
You could make an icon in the inventory which goes to a "second page" of the inventory
but you cant really make new slots
how can I make blockdata? I want to set the note blockdata of a noteblock
you'll never be able to see the new slots though
@fleet crane I'm using a moded client
It does look like that :p
I prefectly works on client side, but it brakes down when I try to add the slots in spigot đŠ
does anyone know how to make world border a rectangle instead of a square shape?
so its my first time creating a plugin and first time messing around with java and stuff. I am using intellij ide and when i try to add a event handler, the function name and the import thing are grey. Is that normal?
the function name will be grey because the ide thinks its not being used but it will as long as you set it up correctly
ok thanks
also did i do this right?
@EventHandler
public void PlayerInteractEvent(Action action, Block block, BlockFace face, ItemStack stack) {
}
umm not sure about that one usually I do ```java
public void onInteract(PlayerInteractEvent e) {
}```
Hey so im trying to spawn an armorstand on server launch at a specific location, how can I do that?
oh you mean on server startup after the world loads?
you building a plugin or no?
Yes, its been several years since ive touched this stuff, a lot has changed. The way I was doing it is deprecated
and just doesnt spawn
ok so you got the plugin.yml down?
@Override
public void onEnable() {
spawnStand(new Location(Bukkit.getWorld("World"), 136, 64, -174));
}
private void spawnStand(Location location) {
ArmorStand stand = (ArmorStand) location.getWorld().spawnEntity(location, EntityType.ARMOR_STAND);
}
last time I did something like that I did java Bukkit.getWorld("world").spawn(new Location(), ArmorStand.class);
how do i get the item from onInteract()?
i tried using e.getItem() == new ItemStack(Material.STICK) but its not working
@EventHandler
public void onNoteBlockHit(PlayerInteractEvent e) {
if(e.getClickedBlock() != null) {
if (e.getClickedBlock().getType().equals(Material.NOTE_BLOCK) && e.getPlayer().isSneaking() && e.getAction().equals(Action.LEFT_CLICK_BLOCK)) {
}
}
}
something like that
thanks
yep đ
would that work for items too?
like the ones in your inventory that you hold?
yea like a stick or something
it would be e.getItem().getType().equals(Material.STICK)
sorry misread what getHand() was
thanks
yep đ
where is the list of events i can use in the documentation
but where are the events i can use?
hey guys, trying to use this library. https://minuskube.gitbooks.io/smartinvs/pages/content_provider.html
my question is, what is the best way to "cache" InventoryContents so this isn't being re-fetched after every open?
what do you mean you can use all of those
like example
you can't store it in a variable? @frigid ember
where would i find onInteract
i cant find onInteract on there
onInteract is just a method name
when making a method for an event you can name the method whatever you like as long as PlayerInteractEvent is a variable in the method and you have the @EventHandler above it
ohhhhhhhhhhhhhhhhhhhhhhhhhhh
does anyone know how to make world border a rectangle instead of a square shape?
Use this option to force superperms-based permissions handler regardless of detected installed perms plugin.
This is useful if you want superperms-based permissions (with wildcards) for custom permissions plugins.
If you wish to use EssentialsX's built-in permissions using the player-commands section above, set this to false.
Default is true.
use-bukkit-permissions: false
Does this have to be true in order for people to have to tpaccept instead of automatically teleporting.
whats the best way to open and inventory for someone?
E
/invsee
What....
i am talking about opening an inventory i made, i get p.openInv and stuff but it seems to lag the server.
then something wrong with ur code
How so.
Wouldnât have a clue, all it does is make an intentory get the servers from a config duke in a forloop as you can have as many servers as you want then return the inventory then open the inventory by getting the method
does anyone know how to make world border a rectangle instead of a square ?
You try to open a menu just like you state in a config? Then open it for player?
@lean stratus I don't think such thing is possible currently
Method method = EntityType.class.getDeclaredMethod("a", Class.class, String.class, int.class);
this returns that method "a" doesn't exist.
I'm using 1.8.R3 and I know some methods were renamed.
I was just wondering if you know what "a" was renamed to.
EntityType is in Spigoty
nvm
I was using EntityType not EntityTypes
my brain lol
What's the event for an arrow hitting a wood button?
ProjectileHitEvent#getHitBlock
Ty
Is there not a better way of getting a player's ping that doesn't involve CraftPlayer? (1.15.2)
nop
actually, you could use protocollib to intercept ping packet
but using CraftPlayer would be much easier
@torn robin
Hello, can you change from PaperMC to Spigot? What if I do?
most plugins should be compatible with spigot
Well, I downloaded all the plugins in Spigot and Bukkit ...
What Java SDK can I use for Minecraft AntiCheats?? Spigot btw :>
Anything 8+
I'd recommend just using the latest though
keeping in mind a large amount of servers are on 8
java 14 đ
does the metatata stays on player if he disconnects?
Small question:_
I've been testing my plugin and I've noticed SQLite didn't quite work in 1.8
Is it because Spigot 1.8.8 didn't shade in the driver?
It definitely did
For this code:
Player p = ...;
ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
p.openBook(book);
The book contains red text: * Invalid book tag *
Does the book item have to be in the player's inventory?
I think you have to edit something like a bookmeta iirc
I'll try re-setting the meta values ty
It doesn't help unfortunately:
BookMeta bm0 = (BookMeta) book.getItemMeta();
bm0.setTitle("Blank");
bm0.setGeneration(BookMeta.Generation.ORIGINAL);
bm0.setPages("");
book.setItemMeta(bm0);
I tried it with just the title, and just the pages
i think they have to be holding the book
Ah and there's no way to bypass that?
i screwed around with this a few weeks ago and I ended up saving the item in their hand, and giving them the book before opening it
i think you can take the book away as soon as its open tho - it doesn't have to stay in their hand
Ah ty, makes sense
heyya if I want to work with nms, how do I exactly add it to dependencies with maven?
Why?
Here's another question- shouldn't it be WRITEABLE_BOOK and not WRITTEN_BOOK?
Caused by: java.lang.IllegalArgumentException: Book must be Material.WRITTEN_BOOK
When I use WRITTEN I get this error
Also it still says invalid book meta
@terse river if handle is an abstract function you can't call it
It has no body
Abstract means that someone has written the function header (name, return type and arguments) but not written any code for it
Abstract means that someone has written the function header (name, return type and arguments) but not written any code for it
@pastel fox But how else can I call the function?
@terse river some class will extend the class that has that function and it will be implemented there without the abstract keyword
Or maybe you have to implement it, Idk what that library is that you're using
But most probably the first thing I said
@silk bane ok so, AFAIK it's impossible to force open a book and quill- only written books
so rip
@terse river some class will extend the class that has that function and it will be implemented there without the abstract keyword
@pastel fox But why can I call the function in the Main class?...
Ah ik
The file must be in the same package as the other one. Now it works.
@terse river not sure, if you can call in main class but not in another package I guess it's the access level
Yeah
You implemented it without using the public keyword maybe? That limits it to files in the same package
yeah
Can anyone help? I have a command that takes a player to a different world and I have an event that handles world change. Is there a way that I can stop the event from running when the command is run?
Cancel the event?
Only on command though
No I donât think so why?
I kind of need to cancel the event in one place. I saw this link http://bukkit.gamepedia.com/Event_API_Reference#Event_Priorities and wondered if this would work for on command?
That has really nothing todo with it?
Making your CustomEvent Cancellable If you ever want to make your event cancellable, remember one thing: "implements Cancellable." Just like you would import Listener. It's really that simple, let me show you an example!
Its at the bottom
I wondered how I could cancel it for the command this way?
This wouldnât cancel the world change event
And itâs most likely completely unnecessary unless youâre making your own api
Okay
how would i go about making a custom crafting recipe using a custom itemstack to produce a custom itemstack in 1.8?
Hello I'm trying to spawn custom entities. I have a class called DummyZombie which I extends the NMS Zombie, I have a class called CustomEntities which I use for storing the constants and I have a class called CustomEntityType which I use to register the custom entity. Problem is when I spawn the zombie it spawns a pig however the pig acts exactly like a zombie, burns in the daylight, kills the player, etc...
DummyZombie: https://hastebin.com/medeqemima.java
CustomEntityType: https://hastebin.com/uxitoxuqum.java
CustomEntities: https://hastebin.com/cunonebunu.java
Command I use to spawn the entity: https://hastebin.com/febuqulobo.java
lol
There is no stack trace incase you ask
Yeah
Is there anyone on who would be willing to help me with the voting plugin configs with votifier?
Change network ID which can be found here http://minecraft.gamepedia.com/Data_values/Entity_IDs and it works like how the entity will appear iirc
@jaunty night
?ask @rain plank
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
What
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
@worldly heath
Thatâs what I did, Iâm at work so I meant anyone on in general â at any part of the day. đ„°
...
how would i go about making a custom crafting recipe using a custom itemstack to produce a custom itemstack in 1.8?
sorry
oops
The API takes custom ItemStacks when managing recipes?
