diff options
author | Ninjune <enderknight537@gmail.com> | 2022-11-25 23:39:40 -0600 |
---|---|---|
committer | Ninjune <enderknight537@gmail.com> | 2022-11-25 23:39:40 -0600 |
commit | f8aacdf7e45003719efd949ecb8bc30001e24e17 (patch) | |
tree | f7719d8b22dd868217eea8e31f03e79a4ac15e12 /commands | |
parent | 9bb7bf0b2f4dbc9269b0e5fa446d8480b814fe20 (diff) | |
download | coleweight-f8aacdf7e45003719efd949ecb8bc30001e24e17.tar.gz coleweight-f8aacdf7e45003719efd949ecb8bc30001e24e17.tar.bz2 coleweight-f8aacdf7e45003719efd949ecb8bc30001e24e17.zip |
v1.6.5v1.6.6
Diffstat (limited to 'commands')
-rw-r--r-- | commands/claim.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/commands/claim.js b/commands/claim.js index 5abeda8..ae20924 100644 --- a/commands/claim.js +++ b/commands/claim.js @@ -24,7 +24,7 @@ export function claim(structure) return } - axios.get(`https://ninjune.dev/api/claim?type=${structure}&lobby=${constants.serverData.server}&method=auth&username=${Player.getName()}&serverID=${serverId}`) + axios.get(`https://ninjune.dev/api/claim?type=${structure}&lobby=${constants.serverData.server}&username=${Player.getName()}&serverID=${serverId}`) .then(res => { if(res.data.success) ChatLib.chat(`${PREFIX}&aSuccessfully claimed ${constants.serverData.server} as your server!`) @@ -50,7 +50,7 @@ register('gameLoad', (event) => { register('worldLoad', () => { if(!settings.claiming) return - axios.get(`https://ninjune.dev/api/unclaim?method=auth&username=${Player.getName()}&serverID=${serverId}`) + axios.get(`https://ninjune.dev/api/unclaim?username=${Player.getName()}&serverID=${serverId}`) .then(res => { if(settings.debug && !res.data.success) ChatLib.chat("Unclaim: " + res.data.reason) @@ -67,7 +67,7 @@ register('worldLoad', () => { PlayerMap = NetHandlerPlayClient.func_175106_d() // getPlayerInfoMap if(settings.debug) console.log(constants.serverData.server) - axios.get(`https://ninjune.dev/api/claim?claimedlobby=${constants.serverData.server}`) + axios.get(`https://ninjune.dev/api/claimed?serverID=${constants.serverData.server}&authServer=${serverId}&passedName=${Player.getName()}`) .then(res => { if(res.data.claimed) { @@ -81,6 +81,10 @@ register('worldLoad', () => { }) }) } + else if (res.data.err && settings.debug) + { + ChatLib.chat("Check claim: " + res.data.reason) + } }) .catch(err => { if(!settings.debug) return |